﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Lucandra.Configuration
{
    public class CassandraEndpointElement : ConfigurationElement
    {
        [ConfigurationProperty("host", IsRequired = true)]
        public string Host
        {
            get { return (string)this["host"]; }
            set { this["host"] = value; }
        }

        [ConfigurationProperty("port", IsRequired = true)]
        public ushort Port
        {
            get { return (ushort)this["port"]; }
            set { this["port"] = value; }
        }

        [ConfigurationProperty("timeout", IsRequired = false, DefaultValue = 0)]
        public int Timeout
        {
            get { return (int)this["timeout"]; }
            set { this["timeout"] = value; }
        }
    }
}
